home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 039a / uw201.zip / UW_HELP4.HLP < prev    next >
Text File  |  1991-10-07  |  24KB  |  571 lines

  1. `co(4,7);─────────────────────── /// Rectangle Functions ────────────────────────────`co();
  2.  
  3. ┌──────────────────────────────────────────────────────────────────────────┐    
  4. │          `keyword(set_rect,/// set_rect);                  `keyword(rect_equal,/// rect_equal);        `keyword(rect_overlap,/// rect_overlap);        │
  5. │          `keyword(offset_rect,/// offset_rect);               `keyword(cr_inrect,/// cr_inrect);                             │
  6. └──────────────────────────────────────────────────────────────────────────┘
  7.  
  8.         The UltraWin library uses the structure RECT to handle information
  9.     dealing with rectangular sections of the screen, as in the WINDOW
  10.     structure.    Included are functions to define the rectangle, check to
  11.     see if one rectangle overlaps another, and several other routines
  12.     that you may wish to utilize in your program.
  13.  
  14. `co(10,1);/// set_rect`co();   `keyword(source,[UW_WIN.C]~set_rect);
  15.     Takes the variable of type RECT passed by pointer, and sets the upper
  16.     left corner and lower right corner to the coordinates passed as
  17.     integers.
  18.  
  19. Prototype:
  20.     void set_rect(RECT *rectp, int x1, int y1, int x2, int y2);
  21.  
  22. Parameters:
  23. `co(11,1);    RECT *rectp;`co();
  24.         A pointer to the rectangle variable.
  25. `co(11,1);    int x1, y1, x2, y2`co();
  26.         The coordinate pair for the upper left corner (x1,y1) and the
  27.         lower right corner (x2,y2) of the rectangle.
  28.  
  29. Usage:
  30.     RECT r;
  31.     ...
  32.     set_rect( &r, 10, 10, 20, 20 );
  33.  
  34. `co(10,1);/// rect_equal`co();   `keyword(source,[UW_WIN.C]~rect_equal);
  35.     Checks to see if the two rectangles are the same.
  36.  
  37. Prototype:
  38.     int rect_equal(RECT r1, RECT r2);
  39.  
  40. Parameters:
  41. `co(11,1);    RECT r1, r2;`co();
  42.         The two rectangles to compare.
  43.  
  44. Usage:
  45.     RECT r1, r2;
  46.     ...
  47.     if (rect_equal( r1, r2 )) {}
  48.  
  49. `co(10,1);/// rect_overlap`co();   `keyword(source,[UW_WIN.C]~rect_overlap);
  50.     Reports on the relationship between two windows.  This function
  51.     will return the status as one of the following (defined in uw.h):
  52.         1) FIRST_ENCLOSED
  53.                  The first rectangle is enclosed within the second.
  54.         2) SECOND_ENCLOSED
  55.                  The second rectangle is enclosed within the first.
  56.         3) OVERLAP
  57.                  The rectangles overlap
  58.         4) NO_OVERLAP
  59.                  The rectangles do not overlap.
  60.  
  61. Prototype:
  62.     int rect_overlap(RECT *r1, RECT *r2);
  63.  
  64. Parameters:
  65. `co(11,1);    RECT r1, r2;`co();
  66.         The two rectangles whose relationship to find.
  67.  
  68. Usage:
  69.     RECT r1, r2;
  70.     int status;
  71.     ...
  72.     status = rect_overlap( r1, r2 );
  73.  
  74. `co(10,1);/// offset_rect`co();   `keyword(source,[UW_WIN.C]~offset_rect);
  75.     Moves the rectangles coordinates by a fixed amount in both the
  76.     x (column) and y (row) direction.  The fixed amount can either
  77.     be positive or negative.
  78.  
  79. Prototype:
  80.     void offset_rect(RECT *rectp, int col, int row);
  81.  
  82. Parameters:
  83. `co(11,1);    RECT *rectp;`co();
  84.         A pointer to the rectangle variable.
  85. `co(11,1);    int col, row`co();
  86.         The offsets to add to the rectangle's coordinates.
  87.  
  88. Usage:
  89.     RECT r;
  90.     ...
  91.     offset_rect( &r, 5, -4 );
  92.  
  93. `co(10,1);/// cr_inrect`co();   `keyword(source,[UW_WIN.C]~cr_inrect);
  94.     Check to see if a particular location is inside (or on the border 
  95.     of) the rectangle passed.
  96.  
  97. Prototype:
  98.     int cr_inrect(int col, int row, RECT rect);
  99.  
  100. Parameters:
  101. `co(11,1);    int col, row`co();
  102.         The coordinate to see if it lies in the rectangle.
  103. `co(11,1);    RECT r;`co();
  104.         The rectangle to check.
  105.  
  106. Usage:
  107.     RECT r;
  108.     ...
  109.     if (cr_inrect( 5, 5, r )) {}
  110.  
  111. `co(4,7);──────────────────────────── /// Data Entry ────────────────────────────────`co();
  112.  
  113. ┌──────────────────────────────────────────────────────────────────────────┐    
  114. │           `keyword(wn_gets,/// wn_gets);                            `keyword(Masks/Templates,/// Masks/Templates);             │
  115. │           `keyword(Validation Chars,/// Validation Chars);                   `keyword(Strip Mask Option,/// Strip Mask Option);           │
  116. └──────────────────────────────────────────────────────────────────────────┘
  117.  
  118.     One of the most flexible of all functions in the UltraWin library
  119.     is wn_gets.  With this one function you can have the user enter
  120.     dates, times, prices, strings, and any other type will full
  121.     control over every character entered!  UltraWin V2.00 adds an even
  122.     more powerful lower level function now called by wn_gets to enhance
  123.     the capabilities even further.  Full compatibility is maintained.
  124.   The new function called wn_gets_ll (which wn_gets calls) has added
  125.   the capability to uppercase the first char of each word, strip the
  126.   mask completely, only strip the end, or not strip at all.  More
  127.   importantly, it can allow the user to input a string longer than the
  128.   display width of the field and will scroll within this region
  129.   automatically! It can also display arrows to show the user that the
  130.   string has data to the left or right of the current display field.
  131.   If this isn't enough for you, we've added the ability to call your own
  132.   validation function for every key pressed in wn_gets_ll!  This allows
  133.   you to validate the user's input "as it happens", and allows you to
  134.   customize the validation routine for any data entry task.
  135.   see `keyword(set_validation_func,/// set_validation_func);
  136.  
  137. `co(10,1);/// wn_gets`co();   `keyword(source,[UW_ENTRY.C]~wn_gets);
  138.     Get input from the user according to the restrictions of the mask
  139.     and template strings in the window passed by pointer.  This 
  140.     function will pass back the input either with the mask characters
  141.     included in the string, or stripped out.    A -1 is returned if the
  142.     mouse is clicked off of the string, and one of the values KEY_UP,
  143.     KEY_DN, KEY_PGUP, KEY_PGDN, KEY_ESC, KEY_ENTER or KEY_TAB (all
  144.     defined in uw.h) are returned if pressed.  Read about the mask and
  145.     template strings for more information.
  146.  
  147. Prototype:
  148.     int wn_gets( char *str, char *mask, char *template, int m_att,
  149.                             int strip_mode, WINDOW *wnp );
  150.  
  151. Parameters:
  152. `co(11,1);    char *str`co();
  153.         The string to be returned by the function.
  154. `co(11,1);    char *mask`co();
  155.         The mask string.
  156. `co(11,1);    char *template`co();
  157.         The template string.
  158. `co(11,1);    int m_att`co();
  159.         The attribute (colors) to use when displaying the string.
  160. `co(11,1);    int strip_mode`co();
  161.         Set to 1 (STRIP_ON) to strip mask characters out of result,
  162.         or set to 0 (STRIP_OFF) for full mask and result.
  163. `co(11,1);    WINDOW *wnp;`co();
  164.         A pointer to the window in which entry is to take place.
  165.  
  166. Usage:
  167.     WINDOW *wnp;
  168.     int result;
  169.     char s[80];
  170.     ...
  171.     result = wn_gets( s, "(___)-___-____", "###  ### ####",
  172.                                         wnp->att, STRIP_ON, wnp);
  173.  
  174. `co(10,1);/// wn_gets_ll`co();   `keyword(source,[UW_ENTRY.C]~wn_gets_ll);
  175.     This function has the same capabilities as wn_gets() and more. wn_gets_ll
  176.     has the capability to uppercase the first char of each word, strip the
  177.   mask completely, only strip the end, or not strip at all.  More
  178.   importantly, it can allow the user to input a string longer than the
  179.   display width of the field and will scroll within this region
  180.   automatically! It can also display arrows to show the user that the
  181.   string has data to the left or right of the current display field.
  182.   If this isn't enough or you, we've added the ability to call your own
  183.   validation function for every key pressed in wn_gets_ll!  This allows
  184.   you to validate the user's input "as it happens", and allows you to
  185.   customize the validation routine for any data entry task.
  186.   see `keyword(set_validation_func,/// set_validation_func);
  187.  
  188. Prototype:
  189.     int wn_gets_ll( char *str, char *mask, char *template, int m_att,
  190.                             int flags, int disp_width, WINDOW *wnp );
  191.  
  192. Parameters:
  193. `co(11,1);    char *str`co();
  194.         The string to be returned by the function.
  195. `co(11,1);    char *mask`co();
  196.         The mask string.
  197. `co(11,1);    char *template`co();
  198.         The template string.
  199. `co(11,1);    int m_att`co();
  200.         The attribute (colors) to use when displaying the string.
  201. `co(11,1);    int flags`co();
  202.    G_STRIP        strips the entire mask from the string.
  203.                 * 12/04/91 = 120491, (432)-555-3421 = 4325553421
  204.    G_STRIP_END    strips the end of the string only.
  205.                 * John Doe____ = John Doe
  206.    G_UP_FST_CHAR  convert the first letter of each word to uppercase
  207.                 * this is a test = This Is A Test
  208.    G_ARROW        displays left and right arrows if display width is less
  209.                   than field width. NOTE: This requires an additional
  210.                   screen/window space before and after the field.
  211.    G_VALIDATE     call the validation function set by `keyword(set_validation_func,/// set_validation_func); 
  212. `co(11,1);    int disp_width`co();
  213.         The number of characters to display.  If less than the length of
  214.         the input field, the display field will scroll.
  215.  
  216. `co(11,1);    WINDOW *wnp;`co();
  217.         A pointer to the window in which entry is to take place.
  218.  
  219. Usage:
  220.     WINDOW *wnp;
  221.     int result;
  222.     char s[80];
  223.     ...
  224. /*---- strip mask, convert first character of each word to uppercase, -----*/
  225. /*------- and only display 6 characters, using arrows to show more --------*/
  226.     result = wn_gets_ll( s, "______________", "AAAAAAAAAAAAA", wnp->att,
  227.         G_STRIP | G_UP_FIRST_CHAR | G_ARROW, 6, wnp);
  228.  
  229. `co(10,1);/// Masks/Templates`co();
  230.  
  231.     The wn_gets function requires the programmer to specify two
  232.     important strings to perform its magic.  These are the mask and
  233.     template strings.
  234.  
  235.     The mask string gives the programmer the flexibility of displaying
  236.     textual information inside the area to be typed by the user.    When
  237.     the user types, the cursor simply skips over the mask characters.
  238.  
  239.     The template string is essentially a string containing validation
  240.     characters.  Before a character is entered into the string, the
  241.     wn_gets function compares the typed character with the template
  242.     to see if the character is valid.  In addition, the template can
  243.     be used to force an uppercase or lowercase character without having
  244.     the user touch the CapsLock or Shift keys.
  245.  
  246.     When combined, the mask and template strings give the programmer
  247.     great flexibility.    The following are just a few examples with
  248.     explanations of what they accomplish:
  249.  
  250.     mask = "________"           Enter an 8 character string, where all
  251.     tplt = "AAAAAAAA"           characters must be alphanumeric.
  252.     
  253.     mask = "________"           Enter an 8 character string, where
  254.     tplt = "********"           anything typed is valid.
  255.     
  256.     mask = "________"           Enter an 8 character string, where the
  257.     tplt = "Uaaaaaaa"           first character is converted to
  258.                                                             uppercase, and the rest must be alpha.
  259.     
  260.     mask = "________"           Enter an 8 character string, where all 8
  261.     tplt = "uuuuuuuu"           characters must by typed in uppercase.
  262.  
  263.     mask = "(___) ___-____"     Enter a 14 character string, where only
  264.     tplt = " ###  ### ####"     numbers can be typed at the _ positions.
  265.  
  266.  
  267. `co(10,1);/// Validation Chars`co();
  268.  
  269.     Validation characters are simply characters that are valid to put
  270.     in your templates.    The following is a list of the validation
  271.     characters along with their effect.
  272.     
  273.     Validation Char          Effect
  274.     ---------------          -----------------------------------------------
  275.              '#'             Allow only a digit to be entered.
  276.              'X'             Allow only a hexidecimal digit to be entered.
  277.              'u'             Allow only upper case letters to be entered.
  278.              'l'             Allow only lower case letters to be entered.
  279.              'U'             Convert to upper case, even if typed as lower.
  280.              'L'             Convert to lower case, even if typed as upper.
  281.              'A'             Allow only alphanumeric characters and <space>.
  282.              'a'             Allow only alpha characters and <space>.
  283.              '*'             Allow any characters.
  284.  
  285. `co(10,1);/// Strip Mask Option`co();
  286.  
  287.     This parameter to the wn_gets function gives the programmer the
  288.     option to have wn_gets either format the string with the mask
  289.     characters intact, or strip out the mask characters.    This can
  290.     best be demonstrated as follows:
  291.  
  292.     mask = "(___) ___-____"
  293.     tplt = " ###  ### ####"
  294.     
  295.     When wn_gets is called with these parameters, and a phone number is
  296.     entered, the display looks like this:
  297.     
  298.                                                         (123) 456-7890
  299.  
  300.     Very simply, if the strip mask option is not used, then this string
  301.     is what is returned by the function (mask intact).    However, if the
  302.     strip mask option is used, then the returned string would be:
  303.     
  304.                                                              1234567890
  305.  
  306.     with no mask characters left, only what the user typed!  By utilizing
  307.     this parameter in appropriate places you can save yourself a considerable
  308.     amount of work.
  309.  
  310. `co(10,1);/// set_validation_func`co();   `keyword(set_validation_func,[UW_ENTRY.C]~set_validation_func);
  311.     This allows you to set your own data entry validation function that
  312.     is called every time a character is typed in `keyword(wn_gets_ll,/// wn_gets_ll); 
  313.   Note that this is not necessarily called for every keystroke.  If the
  314.   user pressed the arrow keys, backspace, etc. the function will not be
  315.   called.  It is called only when entering data.  When the function is 
  316.   called it is passed a series of parameters that allow complete flexibility.
  317.   The validation routine should return a 1 if all's well, else it should 
  318.   return a 0.  If 0 is returned, the entry routine will overwrite the
  319.   invalid character with the mask character for the current position.
  320.   See the demo program `keyword(str_demo,[STR_DEMO.C]main); for more details.
  321.  
  322. Prototype:
  323. void set_validation_func( int (*func_ptr)() )
  324.  
  325. Parameters:
  326.   func_ptr - a function pointer which is called fo each character entry
  327.  
  328. Usage:
  329.     set_validation_func( date_vld );
  330. ...
  331. int date_vld(char *w, char *t, char *m, int pos, int max_pos, WINDOW *wnp )
  332. {
  333.     /* w       - pointer to current work string */
  334.     /* m       - pointer to the mask            */
  335.     /* m       - pointer to the template        */
  336.     /* pos     - current position in string     */
  337.     /* max_pos - maximum position in string     */
  338.     /* WINDOW  - pointer to entry window (can be used to output err msg,etc) */
  339. }
  340.  
  341. `co(4,7);───────────────────────────── /// Menuing ──────────────────────────────────`co();
  342.  
  343. ┌──────────────────────────────────────────────────────────────────────────┐    
  344. │          `keyword(menu_create,/// menu_create);             `keyword(menu_destroy,/// menu_destroy);          `keyword(menu_set,/// menu_set);          │ 
  345. │          `keyword(menu_restore,/// menu_restore);            `keyword(item_add,/// item_add);              `keyword(do_menu,/// do_menu);           │
  346. │          `keyword(menu_system,/// menu_system);                                                     │
  347. └──────────────────────────────────────────────────────────────────────────┘
  348.  
  349.     Another feature of the UltraWin library is menuing.  UltraWin allows
  350.     both vertical and horizontal menus to be easily created and displayed
  351.     for interaction with the user.    The menu's entries can be selected with
  352.     just one keystroke (or a simple click of the mouse).  The letter to
  353.     check when selecting an entry can be any character of the entry, and
  354.     can even be highlighted in a different color.  In addition, the menus
  355.     can be defined as a popup menu, restoring the area under the menu when
  356.     finished, or it can be used with the window manager, forcing redraw
  357.     of the area(s) of the window(s) below the menu when finished.
  358.  
  359. `co(10,1);/// menu_create`co();   `keyword(source,[UW_MENU.C]~menu_create);
  360.     Initializes the menu to the specified coordinates on the screen,
  361.     the menu attributes (colors), the border style and menu type
  362.     passed.  A call to this function must be made to define the menu
  363.     before the menu is placed on the screen with menu_set.    For
  364.     the type parameter, use WN_POPUP if you wish the menu to be a
  365.     popup menu (restoring the screen below), or WN_NORMAL if you are
  366.     using UltraWin's powerful window manager.
  367.  
  368. Prototype:
  369.     void menu_create(int x_min, int y_min, int x_max, int y_max,
  370.                                  int direction, int back_att, int bdr_att, int csr_att,
  371.                                  int first_att, int bdr, int type, MENU *mnp);
  372.  
  373. Parameters:
  374. `co(11,1);    int x_min, y_min`co();
  375.         The upper left corner of the menu to create.
  376. `co(11,1);    int x_max, y_max`co();
  377.         The lower right corner of the menu to create.
  378. `co(11,1);    int direction`co();
  379.         The menu direction, use M_VERTICAL for a vertical menu and
  380.         M_HORIZONTAL for a horizontal menu.
  381. `co(11,1);    int back_att`co();
  382.         The attribute to use for the menu.    This defines the color of
  383.         the menu and the characters in the menu, and can be a value from
  384.         0-255.    For example, use (RED << 4) | WHITE for white menu entry
  385.         characters on a red background.
  386. `co(11,1);    int bdr_att`co();
  387.         The border attribute (not used if the bdr parameter is NO_BDR).
  388. `co(11,1);    int csr_att`co();
  389.         The attribute to use when displaying the cursor position.
  390. `co(11,1);    int first_att`co();
  391.         The attribute to use for the menu entry selection character.
  392.         Typically you would use the same background color as back_att,
  393.         but a different foreground color.
  394. `co(11,1);    int bdr`co();
  395.         The border style, can be either NO_BDR, SGL_BDR, DBL_BDR,
  396.         SLD_BDR or DUAL_BDR (defined in uw.h).
  397. `co(11,1);    int type`co();
  398.         The menu type, can be either WN_POPUP or WN_NORMAL.  Use the
  399.         former when not using the window manager.
  400. `co(11,1);    MENU *mnp;`co();
  401.         A pointer to the menu to create.
  402.  
  403. Usage:
  404.     MENU mn;
  405.     int back_att, bdr_att, csr_att, first_att;
  406.     ...
  407.     menu_create(0, 0, 20, 10, M_VERTICAL, back_att, bdr_att,
  408.                             csr_att, first_att, SGL_BDR, WN_NORMAL, *mn);
  409.  
  410. `co(10,1);/// menu_destroy`co();   `keyword(source,[UW_MENU.C]~menu_destroy);
  411.     This function destroys the menu created with menu_create.  The
  412.     window allocated for the menu is freed.
  413.         
  414. Prototype:
  415.     void menu_destroy( MENU *mnp );
  416.  
  417. Parameters:
  418. `co(11,1);    MENU *mnp;`co();
  419.         A pointer to the menu to destroy.
  420.  
  421. Usage:
  422.     MENU *mnp;
  423.     ...
  424.     menu_destroy(mnp);
  425.  
  426. `co(10,1);/// menu_set`co();   `keyword(source,[UW_MENU.C]~menu_set);
  427.     This function takes a menu created with menu_create, and places
  428.     it on the screen.  If the menu was defined with type WN_POPUP, the
  429.     area below the window will be saved for later restoration.
  430.  
  431. Prototype:
  432.     void menu_set( MENU *mnp );
  433.  
  434. Parameters:
  435. `co(11,1);    MENU *mnp;`co();
  436.         A pointer to the menu to place on the screen.
  437.  
  438. Usage:
  439.     MENU *mnp;
  440.     ...
  441.     menu_set(mnp);
  442.  
  443. `co(10,1);/// menu_restore`co();   `keyword(source,[UW_MENU.C]~menu_restore);
  444.     This function takes a menu created with menu_create, placed on
  445.     the screen with menu_set, and removes it from the screen.  If the
  446.     menu was defined with type WN_POPUP, the area below the window is
  447.     restored.  If the menu was defined with type WN_NORMAL and the
  448.     window manager is in use, then the area under the menu will be
  449.     redrawn.
  450.  
  451. Prototype:
  452.     void menu_restore( MENU *mnp );
  453.  
  454. Parameters:
  455. `co(11,1);    MENU *mnp;`co();
  456.         A pointer to the menu to restore.
  457.  
  458. Usage:
  459.     MENU *mnp;
  460.     ...
  461.     menu_restore(mnp);
  462.  
  463. `co(10,1);/// item_add`co();   `keyword(source,[UW_MENU.C]~item_add);
  464.     This function is used to add an entry into a menu.    An integer
  465.     handle (or id) that you define is passed to identify the entry.
  466.     The menu_do function returns this id when the entry is selected.
  467.     In addition, the index into the string for the "active" character
  468.     is passed.    This is the character in the string that is displayed
  469.     in the first_att color upon display, and is used when a key on
  470.     the keyboard is pressed that matches.
  471.  
  472. Prototype:
  473.     void item_add( char *entry, int id, int first_pos, MENU *mnp );
  474.  
  475. Parameters:
  476. `co(11,1);    char *entry;`co();
  477.         The string to add to the menu.    This string does not have to
  478.         be the same length as the width of the menu, as the display
  479.         routines of menu_set and menu_do justify the entry for you.
  480. `co(11,1);    int id`co();
  481.         This is an id you define which will be returned to you when
  482.         the menu item is selected in menu_do.
  483. `co(11,1);    int first_pos`co();
  484.         This is an index into the string for the "active" letter.  This
  485.         letter will be used to check against keyboard letters pressed,
  486.         and will be displayed in the first_att color specified in the
  487.         menu_create function.  For example, for the entry "Dos Shell"
  488.         to make the menu_do function return the id with one keypress,
  489.         use a first_pos of 4, which corresponds to the "S" in "Shell".
  490. `co(11,1);    MENU *mnp;`co();
  491.         A pointer to the menu the item is to be added.
  492.  
  493. Usage:
  494.     #define DOS_SHELL 37
  495.     MENU *mnp;
  496.     ...
  497.     item_add("Dos Shell", DOS_SHELL, 4, mnp);
  498.  
  499. `co(10,1);/// do_menu`co();   `keyword(source,[UW_MENU.C]~do_menu);
  500.     Call this function after you have called menu_set, and the menu
  501.     will be activated for input from the user.    To retain flexibility,
  502.     you may specify whether the do_menu function should interact
  503.     with the user through the wait_event function, or immediately
  504.     process the global Event variable and return to you.    This gives
  505.     you the ability to use your own event logic if you wish, and
  506.     is useful for menus which are static on the screen, as opposed to
  507.     menus that pop up and restore when finished.    If interaction
  508.     through wait_event is specified, then this function returns
  509.     either the id of the item selected, or 0 if no item is selected.
  510.     If you have do_menu only process the information in the global
  511.     variable Event, then a 0 is returned for each call to do_menu
  512.     that does not have an <Enter> keypress in Event.
  513.  
  514. Prototype:
  515.     int do_menu( MENU *mnp, int proc_mode );
  516.  
  517. Parameters:
  518. `co(11,1);    MENU *mnp;`co();
  519.         A pointer to the menu for interaction.
  520. `co(11,1);    int proc_mode`co();
  521.         The processing mode, which can be one of the defines M_GET_EVENT
  522.         or M_PROC_EVENT.    If M_GET_EVENT is used, then the menu will
  523.         get input via the keyboard (or mouse if it exists) until the
  524.         user has either selected one of the items, or pressed the Esc
  525.         key.
  526.  
  527. Usage:
  528.     MENU *mnp;
  529.     ...
  530.     do_menu( mnp, M_GET_EVENT );
  531.  
  532. `co(10,1);/// menu_system`co();   `keyword(source,[UW_MENU.C]~menu_system);
  533.     This function was written specifically for the standard top menu
  534.     bar with corresponding drop down menus.  This function gives you
  535.     the option of displaying the top menu upon entry and removing the
  536.     top menu upon exit (a popup menuing system), or simply use the top
  537.     menu previously placed on the screen with menu_set.  When called,
  538.     the function will interact with the user through the keyboard and
  539.     mouse, and return the menu id of the entry selected.  If the Esc
  540.     key was pressed or the mouse clicked off the menu, then a 0 is
  541.     returned.  Upon completion, the global Event variable will contain
  542.     information about the last key or mouse press.
  543.         
  544.     NOTE: To utilize this function, you must first define your menus
  545.     with menu_create, then add each entry with item_add, being sure
  546.     to define a unique id for each entry.
  547.  
  548. Prototype:
  549.     int menu_system( MENU *top_mnp, MENU *dropmenu[], int draw_top );
  550.  
  551. Parameters:
  552. `co(11,1);    MENU *top_mnp;`co();
  553.         A pointer to the vertical main menu.
  554. `co(11,1);    MENU *dropmenu[];`co();
  555.         An array of pointers to a series of drop down menus.
  556. `co(11,1);    int draw_top`co();
  557.         This parameter can be either 1 or 0, and specifies whether the
  558.         menu_system function should handle the initial display of the
  559.         top menu or assume that the top menu is already displayed.
  560.         Using a value of 1 is useful if you wish your menu system to be
  561.         hidden during your program, and only called up with a key.    Use
  562.         a 0 for when your program keeps the top menu on the screen.
  563.  
  564. Usage:
  565.     MENU *top_mnp;
  566.     MENU *drop_mnp[8];
  567.     ...
  568.     menu_system( top_mnp, drop_mnp, 1);
  569.  
  570. `co(4,7);─ End ──────────────────────────────────────────────────────────────────────`co();`sound(1024,10);
  571.